<template>
<!DOCTYPE html>

<head>

<meta http-equiv="X-UA-Compatible" content="IE=edge">
 
<link rel="stylesheet" href="../../src/assets/DomCss/css/pure-nr-min.css">
<link rel="stylesheet" href="../../src/assets/DomCss/css/fontAwesome/font-awesome.css">
<link rel="stylesheet" href="../../src/assets/DomCss/css/main.css">
<link rel="stylesheet" href="../../src/assets/DomCss/css/admin.css">      

</head>

<!--BEGIN HEADER-->
<div class="pure-menu pure-menu-open pure-menu-horizontal pure-menu-fixed head-menu">
    <a href="#" class="pure-menu-heading"><h2>金融管理系统</h2></a>
    <ul>
        <li class="pure-menu-selected"><a href="#">主页</a></li>
        <li><a href="./Invest/ShowInvestInfo.vue">投资管理</a></li>
        <li><a href="#">标签页</a></li>
        <li><a href="#">标签页</a></li>
        <li><a href="#">标签页</a></li>
    </ul>
    <div class="head-menu-info">
        欢迎您，{{Tname}}<a href="#">{{Uname}}</a>。您选择【首页】【退出】
    </div>
</div>
<!--END HEADER-->
<div class="pure-g content" >
    <div class="pure-u">
        <div class="side">

        </div>
    </div>
    <div class="pure-u-1">
        <div class="main">
            <div class="panel panel-default">
                <div class="panel-title">
                    <ShowInvestInfo></ShowInvestInfo>
                </div>
                <div class="panel-body">
                    面板内容
                </div>
            </div>
   
        </div>
    </div>
</div>
<!--BEGIN FOOT-->
<div class="pure-g copyright">
    <div class="pure-u-1"> 2013 © TWStudio Admin Dashboard Template. </div>
</div>

</template>


<script setup lang="ts">
import {ref,onMounted} from 'vue';

import axios from 'axios';

import {useUserStore} from '../Store/Index.ts'

import  ShowInvestInfo  from '../View/Invest/ShowInvestInfo.vue'



//实例化仓库
const userStore = useUserStore();

onMounted(()=>{
    LoadData();
})

const Tname =ref("");

const Uname =ref("");


const LoadData =()=>{
     axios({
        url:"https://localhost:44337/api/Users/GetUserInfo",
        method:"get",
        params:{
            Uid:userStore.Uid
        }
     }).then(res=>{
        console.log(res.data);
        Tname.value = res.data[0].UT_Name;
        Uname.value = res.data[0].UL_Name;
     }).catch(err=>{
        console.log(err);
     })
}



</script>